GXNewLine
You can use theGXNewLine
function to create a new line shape and initialize its geometry.
gxShape GXNewLine(const gxLine *data);
data
- A pointer to the initial line geometry.
- function result
- A reference to the new line shape.
DESCRIPTION
TheGXNewLine
function creates a copy of the default line shape, sets the owner count of the copy to 1, initializes its geometry with the values in thedata
parameter, and returns a reference to it as the function result.Although this function creates a copy of the default line shape, it does not create a copy of the default line's style, ink, or transform objects. The new line shape returned by this function contains references to same style, ink, and transform as the default line shape.
SPECIAL CONSIDERATIONS
If no error occurs, theGXNewLine
function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about creating and disposing of shapes.If an error occurs, this function returns
nil
as the function result.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory parameter_is_nil (debugging version) SEE ALSO
For an example that uses this function, see "Creating and Drawing Lines" beginning on page 2-36.For a discussion of lines and the default line shape, see "Line Shapes" on page 2-17.
For a description of the
gxLine
structure, see page 2-105.To create a new line shape without specifying an initial geometry, see the description of the
GXNewShape
function in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.To set the geometry of an existing line shape, see the description of the
GXSetLine
function on page 2-124.To draw a line geometry without creating a line shape, see the description of
GXDrawLine
on page 2-158. To draw a line shape, see the description ofGXDrawShape
in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help